/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ArticleDTO } from '../models/ArticleDTO';
import type { ArticleQueryDTO } from '../models/ArticleQueryDTO';
import type { RArticleVO } from '../models/RArticleVO';
import type { RPageArticleVO } from '../models/RPageArticleVO';
import type { RString } from '../models/RString';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class ArticleControllerService {

    /**
     * @param requestBody
     * @returns RString OK
     * @throws ApiError
     */
    public static updateArticle(
        requestBody: ArticleDTO,
    ): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/articles/updateArticle',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RPageArticleVO OK
     * @throws ApiError
     */
    public static getArticlePage(
        requestBody: ArticleQueryDTO,
    ): CancelablePromise<RPageArticleVO> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/articles/getArticlePage',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RArticleVO OK
     * @throws ApiError
     */
    public static getArticleById(
        requestBody: ArticleQueryDTO,
    ): CancelablePromise<RArticleVO> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/articles/getArticleById',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RString OK
     * @throws ApiError
     */
    public static deleteArticle(
        requestBody: ArticleDTO,
    ): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/articles/deleteArticle',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RArticleVO OK
     * @throws ApiError
     */
    public static addArticle(
        requestBody: ArticleDTO,
    ): CancelablePromise<RArticleVO> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/articles/addArticle',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

}
